package com.nchu.learn.netty.model;

import cn.hutool.core.lang.ObjectId;
import lombok.extern.slf4j.Slf4j;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author fujianjian
 * @project self-learning
 * @date 2020/1/16 10:42
 */
@Slf4j
public final class Constants {

    public static final int MAGIC_NUMBER = 0x123345;

    public static final byte MAIN_VERSION = (byte) 1;

    public static final byte SUB_VERSION = (byte) 0;
    public static final byte MODIFY_VERSION = (byte) 0;
    public static final int SESSION_ID_LENGTH = 24;

    public static void main(String[] args) {
        System.out.println(ObjectId.next());
        System.out.println(ObjectId.next().length());
        log.info("current time:{}", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        System.out.println(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
    }


}
